<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello mdui</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<script type="text/javascript" src="../../statics/common/js/header.js"></script>
		<!--标准mdui.css-->
		<link rel="stylesheet" href="../../statics/mdui/css/mdui.min.css">
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="../../statics/mdui/css/app.css"/>
	</head>

	<body>
		<header class="mdui-bar mdui-bar-nav">
			<a class="mdui-action-back mdui-icon mdui-icon-left-nav mdui-pull-left"></a>
			<h1 class="mdui-title">下方悬浮标题</h1>
		</header>
		<div class="mdui-content">
			<ul class="mdui-table-view mdui-table-view-chevron">
				<li id="switch" class="mdui-table-view-cell">
					定时轮播
					<div class="mdui-switch">
						<div class="mdui-switch-handle"></div>
					</div>
				</li>
			</ul>
			<div id="slider" class="mdui-slider">
				<div class="mdui-slider-group mdui-slider-loop">
					<!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->
					<div class="mdui-slider-item mdui-slider-item-duplicate">
						<a href="#">
							<img src="../../statics/mdui/images/yuantiao.jpg">
							<p class="mdui-slider-title">静静看这世界</p>
						</a>
					</div>
					<div class="mdui-slider-item">
						<a href="#">
							<img src="../../statics/mdui/images/shuijiao.jpg">
							<p class="mdui-slider-title">幸福就是可以一起睡觉</p>
						</a>
					</div>
					<div class="mdui-slider-item">
						<a href="#">
							<img src="../../statics/mdui/images/muwu.jpg">
							<p class="mdui-slider-title">想要一间这样的木屋，静静的喝咖啡</p>
						</a>
					</div>
					<div class="mdui-slider-item">
						<a href="#">
							<img src="../../statics/mdui/images/cbd.jpg">
							<p class="mdui-slider-title">Color of SIP CBD</p>
						</a>
					</div>
					<div class="mdui-slider-item">
						<a href="#">
							<img src="../../statics/mdui/images/yuantiao.jpg">
							<p class="mdui-slider-title">静静看这世界</p>
						</a>
					</div>
					<!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->
					<div class="mdui-slider-item mdui-slider-item-duplicate">
						<a href="#">
							<img src="../../statics/mdui/images/shuijiao.jpg">
							<p class="mdui-slider-title">幸福就是可以一起睡觉</p>
						</a>
					</div>
				</div>
				<div class="mdui-slider-indicator mdui-text-right">
					<div class="mdui-indicator mdui-active"></div>
					<div class="mdui-indicator"></div>
					<div class="mdui-indicator"></div>
					<div class="mdui-indicator"></div>
				</div>
			</div>
		</div>
	</body>
	<script src="../../statics/mdui/js/mdui.min.js"></script>
	<script>
		mdui.init({
			swipeBack:true //启用右滑关闭功能
		});
		var slider = mdui("#slider");
		document.getElementById("switch").addEventListener('toggle', function(e) {
			if (e.detail.isActive) {
				slider.slider({
					interval: 5000
				});
			} else {
				slider.slider({
					interval: 0
				});
			}
		});
	</script>
</html>